<template>
	<view>
		<mh-navbar custom :back="true" title="联系客服" fixed center zIndex="1010" />
		<view class="service-bg">
			<image src="/static/img/my/service_bg.png" style="width: 100%;height: 150px;">
		</view>
		<view class="service-note-wrap">
			<view class="service-note">
				常见问题
			</view>
		</view>
		<view class="service-container">
			<view class="service-wrap">
				<view class="service-item" v-for="(item,index) in issuesList" :key="index" @click="goContent(item.issueId)">
					<view class="service-title">
						{{item.title}}
					</view>
					<view><image src="/static/img/my/right.png" style="width: 32px;height: 32px;"></view>
				</view>
			</view>
		</view>
		<view class="service-wx">
			客服微信：{{wx}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				issuesList:[],
				wx:'cnmszf',
			}
		},
		onLoad(){
			this.getIssuesList();
			if(this.$utils.isNotEmpty(this.$store.state.appInfo)){
				debugger
				this.wx = this.$store.state.appInfo.open_customer_wx;
			}
		},
		methods: {
			getIssuesList(){
				this.$u.api.issues().then(res => {
					if (res.code == 200){
						this.issuesList = res.data;
					}
				});
			},
			goContent(issueId){
				uni.navigateTo({
					url: 'pages/mine/issue?issueId=' + issueId
				})
			}
		}
	}
</script>

<style lang="scss">
.service-note-wrap{
	padding: 0 20px 0 20px;
	.service-note{
		padding-left: 5px;
		height: 40px;
		display: flex;
		align-items: center;
		border-left-width: .5rem;
		border-left-style: solid;
		margin: 1rem 0;
	}
}

.service-container{
	padding: 0 20px 0 20px;
	.service-wrap{
		background: #FFFFFF;
		.service-item{
			width: 100%;
			height: 60px;
			border-bottom: 0.5px solid #f2f2f2;
			padding: 0 15px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.service-item-title{
				display: flex;
				flex-direction: row;
				justify-content: center;
				align-items: center;
			}
		}
	}
}
.service-wx{
	display: flex;
	justify-content: center;
	margin-top: 10px;
}
</style>
